package com.hy.properties.config;

import com.hy.properties.prop.OtherMember;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Profile;
import org.springframework.web.client.RestTemplate;

/**
 * Created With IntelliJ IDEA.
 * Descriptions:
 * author: Mr.Du
 * Date: 2023/6/28
 * Time: 18:00
 */
@Profile("main")
@SpringBootConfiguration
@Import({Configuration1.class, Configuration2.class})
public class MainConfig {
    
    @Bean
    @Lazy
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
    
    @Bean
    public OtherMember otherMember() {
        return new OtherMember();
    }
    
}
